(function () {
    let xhr = new XMLHttpRequest()
    xhr.open('get', './data.json')
    xhr.setRequestHeader('Access-Control-Allow-Origin', '*')
    xhr.onreadystatechange = function() {
        let state = xhr.readyState,
            status = xhr.status,
            header = xhr.getAllResponseHeaders(),
            data = xhr.responseText;
        console.log(state, status, header, data)

    }
    xhr.send()
})()